package com.qckj.amz.controller;

import com.alibaba.fastjson.JSONArray;
import com.qckj.amz.dao.ProductTempBasicDao;
import com.qckj.amz.dao.ProductTempDescDao;
import com.qckj.amz.dao.ProductTempRlatDao;
import com.qckj.amz.domain.ProductTempBasic;
import com.qckj.amz.domain.ProductTempDesc;
import com.qckj.amz.domain.ProductTempRlat;
import com.qckj.amz.domain.temp.GoodsExportExcelEntity;
import com.qckj.amz.utils.constants.AmzConstants;
import com.qckj.amz.utils.enums.EnumAmzDictCode;
import com.qckj.common.core.domain.AjaxResult;
import com.qckj.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author luchuan
 * @version v1.0
 * @date 2022/12/23 0023
 **/

@RestController
@RequestMapping("/amz/restfulapi")
public class ProductImportController {

    @Autowired
    private ProductTempBasicDao productTempBasicDao;
    @Autowired
    private ProductTempRlatDao productTempRlatDao;
    @Autowired
    private ProductTempDescDao productTempDescDao;

/*
    @RequestMapping(value = "/import", method = RequestMethod.POST)
    public AjaxResult export(@RequestParam(name = "goodsExcelsList") String goodsExcelsList
            ,@RequestParam(name = "createBy") String createBy
            ,@RequestParam(name = "database") String database) {
*/


    @RequestMapping(value = "/import", method = RequestMethod.POST)
    public AjaxResult export(@RequestBody String goodsExcelsList) {

        String database = "HO";
        String createBy = "QC001";
        //公共属性
        String batchNo = database+"-"+ DateUtils.dateTimeNow();//批次号
        Date createTime = new Date();

        //开始数据处理
        List<GoodsExportExcelEntity> goodsList = JSONArray.parseArray(goodsExcelsList, GoodsExportExcelEntity.class);
        if (goodsList!=null && goodsList.size()>0){

            ArrayList<ProductTempBasic> basicList = new ArrayList<>();
            ArrayList<ProductTempRlat> rlatList = new ArrayList<>();
            ArrayList<ProductTempDesc> descList = new ArrayList<>();

            for (GoodsExportExcelEntity goods: goodsList) {

                System.out.println("new_sku=="+database+"-"+goods.getSku());
                //校验是否已经存在
                ProductTempBasic basicReq = new ProductTempBasic();
                basicReq.setProductCode(database+"-"+goods.getSku());//可能会重复-后期可追加字符
                Example<ProductTempBasic> basicExample = Example.of(basicReq);
                ProductTempBasic productTempBasic = productTempBasicDao.findOne(basicExample).orElse(null);
                if (productTempBasic!=null){
                    continue;//当前产品已经存在，直接跳过
                }

                //有变体：parentChild：parent-child
                //无变体：parentChild：null

                if (goods.getParentChild()==null || goods.getParentChild().equals("Parent")){
                    //基本信息
                    ProductTempBasic basic = new ProductTempBasic();
                    basic.setProductCode(database+"-"+goods.getSku());//可能会重复-后期可追加字符
                    basic.setBatchNo(batchNo);
                    basic.setProductCategory("unknown");//产品分类
                    basic.setStandardPriceCoefficient(new BigDecimal(0.95));//销售价格系数
                    basic.setProductSourceType(database);//产品来源:HO
                    basic.setBuyingLink("");//采购链接
                    basic.setBuyingPrice(new BigDecimal(0));//采购价格
                    basic.setProductSharingType("1");//共享类型:1不共享
                    basic.setIsCommissionType("");//是否佣金
                    basic.setCommissionRate(null);//佣金率
                    basic.setProductStatus("01111");
                    basic.setMainImageUrl(goods.getMainPic());
                    basic.setCreateBy(createBy);
                    basic.setCreateTime(createTime);
                    basicList.add(basic);

                    //变体
                    ProductTempRlat rlat = new ProductTempRlat();
                    rlat.setProductCode(database+"-"+goods.getSku());
                    rlat.setItemSku(database+"-"+goods.getSku());
                    rlat.setParentSku(null);//父体sku为null
                    rlat.setExternalProductId("");//EAN值/父体为null
                    rlat.setExternalProductIdType("");//EAN/父体为null
                    if (goods.getParentChild()==null){
                        rlat.setParentChild(null);
                    }else {
                        rlat.setParentChild(AmzConstants.PARENTAGE_PARENT);
                    }
                    rlat.setRelationshipType(null);//关系类型/父体为null
                    rlat.setVariationTheme(goods.getVariantTheme());
                    rlat.setColorName(goods.getColor());
                    rlat.setSizeName(goods.getSize());
                    rlat.setItemWeight(Double.parseDouble(goods.getWeight()));
                    rlat.setStandardPrice(new BigDecimal(goods.getPrice()));
                    rlat.setQuantity(Integer.parseInt(goods.getStock()));
                    rlat.setMainImageUrl(goods.getMainPic());
                    rlat.setOtherImageUrl1(goods.getPic1());
                    rlat.setOtherImageUrl2(goods.getPic2());
                    rlat.setOtherImageUrl3(goods.getPic3());
                    rlat.setOtherImageUrl4(goods.getPic4());
                    rlat.setOtherImageUrl5(goods.getPic5());
                    rlat.setOtherImageUrl6(goods.getPic6());
                    rlat.setOtherImageUrl7(goods.getPic7());
                    rlat.setOtherImageUrl8(goods.getPic8());
                    rlat.setCreateBy(createBy);
                    rlat.setCreateTime(createTime);
                    rlatList.add(rlat);

                    //描述
                    //英国-英语
                    ProductTempDesc descUK = new ProductTempDesc();
                    descUK.setProductCode(database+"-"+goods.getSku());
                    descUK.setCountryCode(EnumAmzDictCode.COUNTRYCODE_UK.getCode());//英国
                    descUK.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_UK.getDesc());
                    descUK.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descUK.setItemName(goods.getEnTitle());
                    descUK.setGenericKeywords(goods.getEnKey());
                    descUK.setBulletPoint1(goods.getEnKeyPoints1());
                    descUK.setBulletPoint2(goods.getEnKeyPoints2());
                    descUK.setBulletPoint3(goods.getEnKeyPoints3());
                    descUK.setBulletPoint4(goods.getEnKeyPoints4());
                    descUK.setBulletPoint5(goods.getEnKeyPoints5());
                    String productDescriptionUK = "";
                    productDescriptionUK += goods.getEnDescr1()  == null ? "" : goods.getEnDescr1()+"\n";
                    productDescriptionUK += goods.getEnDescr2()  == null ? "" : goods.getEnDescr2()+"\n";
                    productDescriptionUK += goods.getEnDescr3()  == null ? "" : goods.getEnDescr3()+"\n";
                    productDescriptionUK += goods.getEnDescr4()  == null ? "" : goods.getEnDescr4()+"\n";
                    productDescriptionUK += goods.getEnDescr5()  == null ? "" : goods.getEnDescr5()+"\n";
                    productDescriptionUK += goods.getEnDescr6()  == null ? "" : goods.getEnDescr6()+"\n";
                    productDescriptionUK += goods.getEnDescr7()  == null ? "" : goods.getEnDescr7()+"\n";
                    productDescriptionUK += goods.getEnDescr8()  == null ? "" : goods.getEnDescr8()+"\n";
                    productDescriptionUK += goods.getEnDescr9()  == null ? "" : goods.getEnDescr9()+"\n";
                    productDescriptionUK += goods.getEnDescr10() == null ? "" : goods.getEnDescr10()+"\n";
                    productDescriptionUK += goods.getEnDescr11() == null ? "" : goods.getEnDescr11()+"\n";
                    productDescriptionUK += goods.getEnDescr12() == null ? "" : goods.getEnDescr12()+"\n";
                    productDescriptionUK += goods.getEnDescr13() == null ? "" : goods.getEnDescr13()+"\n";
                    productDescriptionUK += goods.getEnDescr14() == null ? "" : goods.getEnDescr14()+"\n";
                    productDescriptionUK += goods.getEnDescr15() == null ? "" : goods.getEnDescr15()+"\n";
                    productDescriptionUK += goods.getEnDescr16() == null ? "" : goods.getEnDescr16()+"\n";
                    productDescriptionUK += goods.getEnDescr17() == null ? "" : goods.getEnDescr17()+"\n";
                    productDescriptionUK += goods.getEnDescr18() == null ? "" : goods.getEnDescr18()+"\n";
                    productDescriptionUK += goods.getEnDescr19() == null ? "" : goods.getEnDescr19()+"\n";
                    productDescriptionUK += goods.getEnDescr20() == null ? "" : goods.getEnDescr20()+"\n";
                    productDescriptionUK += goods.getEnDescr24() == null ? "" : goods.getEnDescr24()+"\n";
                    productDescriptionUK += goods.getEnDescr22() == null ? "" : goods.getEnDescr22()+"\n";
                    productDescriptionUK += goods.getEnDescr23() == null ? "" : goods.getEnDescr23()+"\n";
                    productDescriptionUK += goods.getEnDescr24() == null ? "" : goods.getEnDescr24()+"\n";
                    productDescriptionUK += goods.getEnDescr25() == null ? "" : goods.getEnDescr25()+"\n";
                    productDescriptionUK += goods.getEnDescr26() == null ? "" : goods.getEnDescr26()+"\n";
                    productDescriptionUK += goods.getEnDescr27() == null ? "" : goods.getEnDescr27()+"\n";
                    productDescriptionUK += goods.getEnDescr28() == null ? "" : goods.getEnDescr28()+"\n";
                    productDescriptionUK += goods.getEnDescr29() == null ? "" : goods.getEnDescr29()+"\n";
                    productDescriptionUK += goods.getEnDescr30() == null ? "" : goods.getEnDescr30()+"\n";
                    descUK.setProductDescription(productDescriptionUK.trim());
                    descUK.setCreateBy(createBy);
                    descUK.setCreateTime(createTime);
                    descList.add(descUK);

                    //美国-英语
                    ProductTempDesc descUS = new ProductTempDesc();
                    descUS.setProductCode(database+"-"+goods.getSku());
                    descUS.setCountryCode(EnumAmzDictCode.COUNTRYCODE_US.getCode());//英国
                    descUS.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_US.getDesc());
                    descUS.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descUS.setItemName(goods.getEnTitle());
                    descUS.setGenericKeywords(goods.getEnKey());
                    descUS.setBulletPoint1(goods.getEnKeyPoints1());
                    descUS.setBulletPoint2(goods.getEnKeyPoints2());
                    descUS.setBulletPoint3(goods.getEnKeyPoints3());
                    descUS.setBulletPoint4(goods.getEnKeyPoints4());
                    descUS.setBulletPoint5(goods.getEnKeyPoints5());
                    descUS.setProductDescription(productDescriptionUK.trim());
                    descUS.setCreateBy(createBy);
                    descUS.setCreateTime(createTime);
                    descList.add(descUS);


                    //加拿大-英语
                    ProductTempDesc descCA = new ProductTempDesc();
                    descCA.setProductCode(database+"-"+goods.getSku());
                    descCA.setCountryCode(EnumAmzDictCode.COUNTRYCODE_CA.getCode());//英国
                    descCA.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_CA.getDesc());
                    descCA.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descCA.setItemName(goods.getEnTitle());
                    descCA.setGenericKeywords(goods.getEnKey());
                    descCA.setBulletPoint1(goods.getEnKeyPoints1());
                    descCA.setBulletPoint2(goods.getEnKeyPoints2());
                    descCA.setBulletPoint3(goods.getEnKeyPoints3());
                    descCA.setBulletPoint4(goods.getEnKeyPoints4());
                    descCA.setBulletPoint5(goods.getEnKeyPoints5());
                    descCA.setProductDescription(productDescriptionUK.trim());
                    descCA.setCreateBy(createBy);
                    descCA.setCreateTime(createTime);
                    descList.add(descCA);

                    //澳大利亚-英语
                    ProductTempDesc descAU = new ProductTempDesc();
                    descAU.setProductCode(database+"-"+goods.getSku());
                    descAU.setCountryCode(EnumAmzDictCode.COUNTRYCODE_AU.getCode());//英国
                    descAU.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_AU.getDesc());
                    descAU.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descAU.setItemName(goods.getEnTitle());
                    descAU.setGenericKeywords(goods.getEnKey());
                    descAU.setBulletPoint1(goods.getEnKeyPoints1());
                    descAU.setBulletPoint2(goods.getEnKeyPoints2());
                    descAU.setBulletPoint3(goods.getEnKeyPoints3());
                    descAU.setBulletPoint4(goods.getEnKeyPoints4());
                    descAU.setBulletPoint5(goods.getEnKeyPoints5());
                    descAU.setProductDescription(productDescriptionUK.trim());
                    descAU.setCreateBy(createBy);
                    descAU.setCreateTime(createTime);
                    descList.add(descAU);

                    //法语
                    ProductTempDesc descFR = new ProductTempDesc();
                    descFR.setProductCode(database+"-"+goods.getSku());
                    descFR.setCountryCode(EnumAmzDictCode.COUNTRYCODE_FR.getCode());//英国
                    descFR.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_FR.getDesc());
                    descFR.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descFR.setItemName(goods.getFrTitle());
                    descFR.setGenericKeywords(goods.getFrKey());
                    descFR.setBulletPoint1(goods.getFrKeyPoints1());
                    descFR.setBulletPoint2(goods.getFrKeyPoints2());
                    descFR.setBulletPoint3(goods.getFrKeyPoints3());
                    descFR.setBulletPoint4(goods.getFrKeyPoints4());
                    descFR.setBulletPoint5(goods.getFrKeyPoints5());
                    String productDescriptionFR = "";
                    productDescriptionFR += goods.getFrDescr1()  == null ? "" : goods.getFrDescr1()+"\n";
                    productDescriptionFR += goods.getFrDescr2()  == null ? "" : goods.getFrDescr2()+"\n";
                    productDescriptionFR += goods.getFrDescr3()  == null ? "" : goods.getFrDescr3()+"\n";
                    productDescriptionFR += goods.getFrDescr4()  == null ? "" : goods.getFrDescr4()+"\n";
                    productDescriptionFR += goods.getFrDescr5()  == null ? "" : goods.getFrDescr5()+"\n";
                    productDescriptionFR += goods.getFrDescr6()  == null ? "" : goods.getFrDescr6()+"\n";
                    productDescriptionFR += goods.getFrDescr7()  == null ? "" : goods.getFrDescr7()+"\n";
                    productDescriptionFR += goods.getFrDescr8()  == null ? "" : goods.getFrDescr8()+"\n";
                    productDescriptionFR += goods.getFrDescr9()  == null ? "" : goods.getFrDescr9()+"\n";
                    productDescriptionFR += goods.getFrDescr10() == null ? "" : goods.getFrDescr10()+"\n";
                    productDescriptionFR += goods.getFrDescr11() == null ? "" : goods.getFrDescr11()+"\n";
                    productDescriptionFR += goods.getFrDescr12() == null ? "" : goods.getFrDescr12()+"\n";
                    productDescriptionFR += goods.getFrDescr13() == null ? "" : goods.getFrDescr13()+"\n";
                    productDescriptionFR += goods.getFrDescr14() == null ? "" : goods.getFrDescr14()+"\n";
                    productDescriptionFR += goods.getFrDescr15() == null ? "" : goods.getFrDescr15()+"\n";
                    productDescriptionFR += goods.getFrDescr16() == null ? "" : goods.getFrDescr16()+"\n";
                    productDescriptionFR += goods.getFrDescr17() == null ? "" : goods.getFrDescr17()+"\n";
                    productDescriptionFR += goods.getFrDescr18() == null ? "" : goods.getFrDescr18()+"\n";
                    productDescriptionFR += goods.getFrDescr19() == null ? "" : goods.getFrDescr19()+"\n";
                    productDescriptionFR += goods.getFrDescr20() == null ? "" : goods.getFrDescr20()+"\n";
                    productDescriptionFR += goods.getFrDescr24() == null ? "" : goods.getFrDescr24()+"\n";
                    productDescriptionFR += goods.getFrDescr22() == null ? "" : goods.getFrDescr22()+"\n";
                    productDescriptionFR += goods.getFrDescr23() == null ? "" : goods.getFrDescr23()+"\n";
                    productDescriptionFR += goods.getFrDescr24() == null ? "" : goods.getFrDescr24()+"\n";
                    productDescriptionFR += goods.getFrDescr25() == null ? "" : goods.getFrDescr25()+"\n";
                    productDescriptionFR += goods.getFrDescr26() == null ? "" : goods.getFrDescr26()+"\n";
                    productDescriptionFR += goods.getFrDescr27() == null ? "" : goods.getFrDescr27()+"\n";
                    productDescriptionFR += goods.getFrDescr28() == null ? "" : goods.getFrDescr28()+"\n";
                    productDescriptionFR += goods.getFrDescr29() == null ? "" : goods.getFrDescr29()+"\n";
                    productDescriptionFR += goods.getFrDescr30() == null ? "" : goods.getFrDescr30()+"\n";
                    descFR.setProductDescription(productDescriptionFR.trim());
                    descFR.setCreateBy(createBy);
                    descFR.setCreateTime(createTime);
                    descList.add(descFR);

                    //德语
                    ProductTempDesc descDE = new ProductTempDesc();
                    descDE.setProductCode(database+"-"+goods.getSku());
                    descDE.setCountryCode(EnumAmzDictCode.COUNTRYCODE_DE.getCode());//英国
                    descDE.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_DE.getDesc());
                    descDE.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descDE.setItemName(goods.getDeTitle());
                    descDE.setGenericKeywords(goods.getDeKey());
                    descDE.setBulletPoint1(goods.getDeKeyPoints1());
                    descDE.setBulletPoint2(goods.getDeKeyPoints2());
                    descDE.setBulletPoint3(goods.getDeKeyPoints3());
                    descDE.setBulletPoint4(goods.getDeKeyPoints4());
                    descDE.setBulletPoint5(goods.getDeKeyPoints5());
                    String productDescriptionDe = "";
                    productDescriptionDe += goods.getDeDescr1()  == null ? "" : goods.getDeDescr1()+"\n";
                    productDescriptionDe += goods.getDeDescr2()  == null ? "" : goods.getDeDescr2()+"\n";
                    productDescriptionDe += goods.getDeDescr3()  == null ? "" : goods.getDeDescr3()+"\n";
                    productDescriptionDe += goods.getDeDescr4()  == null ? "" : goods.getDeDescr4()+"\n";
                    productDescriptionDe += goods.getDeDescr5()  == null ? "" : goods.getDeDescr5()+"\n";
                    productDescriptionDe += goods.getDeDescr6()  == null ? "" : goods.getDeDescr6()+"\n";
                    productDescriptionDe += goods.getDeDescr7()  == null ? "" : goods.getDeDescr7()+"\n";
                    productDescriptionDe += goods.getDeDescr8()  == null ? "" : goods.getDeDescr8()+"\n";
                    productDescriptionDe += goods.getDeDescr9()  == null ? "" : goods.getDeDescr9()+"\n";
                    productDescriptionDe += goods.getDeDescr10() == null ? "" : goods.getDeDescr10()+"\n";
                    productDescriptionDe += goods.getDeDescr11() == null ? "" : goods.getDeDescr11()+"\n";
                    productDescriptionDe += goods.getDeDescr12() == null ? "" : goods.getDeDescr12()+"\n";
                    productDescriptionDe += goods.getDeDescr13() == null ? "" : goods.getDeDescr13()+"\n";
                    productDescriptionDe += goods.getDeDescr14() == null ? "" : goods.getDeDescr14()+"\n";
                    productDescriptionDe += goods.getDeDescr15() == null ? "" : goods.getDeDescr15()+"\n";
                    productDescriptionDe += goods.getDeDescr16() == null ? "" : goods.getDeDescr16()+"\n";
                    productDescriptionDe += goods.getDeDescr17() == null ? "" : goods.getDeDescr17()+"\n";
                    productDescriptionDe += goods.getDeDescr18() == null ? "" : goods.getDeDescr18()+"\n";
                    productDescriptionDe += goods.getDeDescr19() == null ? "" : goods.getDeDescr19()+"\n";
                    productDescriptionDe += goods.getDeDescr20() == null ? "" : goods.getDeDescr20()+"\n";
                    productDescriptionDe += goods.getDeDescr24() == null ? "" : goods.getDeDescr24()+"\n";
                    productDescriptionDe += goods.getDeDescr22() == null ? "" : goods.getDeDescr22()+"\n";
                    productDescriptionDe += goods.getDeDescr23() == null ? "" : goods.getDeDescr23()+"\n";
                    productDescriptionDe += goods.getDeDescr24() == null ? "" : goods.getDeDescr24()+"\n";
                    productDescriptionDe += goods.getDeDescr25() == null ? "" : goods.getDeDescr25()+"\n";
                    productDescriptionDe += goods.getDeDescr26() == null ? "" : goods.getDeDescr26()+"\n";
                    productDescriptionDe += goods.getDeDescr27() == null ? "" : goods.getDeDescr27()+"\n";
                    productDescriptionDe += goods.getDeDescr28() == null ? "" : goods.getDeDescr28()+"\n";
                    productDescriptionDe += goods.getDeDescr29() == null ? "" : goods.getDeDescr29()+"\n";
                    productDescriptionDe += goods.getDeDescr30() == null ? "" : goods.getDeDescr30()+"\n";
                    descDE.setProductDescription(productDescriptionDe.trim());
                    descDE.setCreateBy(createBy);
                    descDE.setCreateTime(createTime);
                    descList.add(descDE);

                    //意大利
                    ProductTempDesc descIT = new ProductTempDesc();
                    descIT.setProductCode(database+"-"+goods.getSku());
                    descIT.setCountryCode(EnumAmzDictCode.COUNTRYCODE_IT.getCode());//英国
                    descIT.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_IT.getDesc());
                    descIT.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descIT.setItemName(goods.getItTitle());
                    descIT.setGenericKeywords(goods.getItKey());
                    descIT.setBulletPoint1(goods.getItKeyPoints1());
                    descIT.setBulletPoint2(goods.getItKeyPoints2());
                    descIT.setBulletPoint3(goods.getItKeyPoints3());
                    descIT.setBulletPoint4(goods.getItKeyPoints4());
                    descIT.setBulletPoint5(goods.getItKeyPoints5());
                    String productDescriptionIt = "";
                    productDescriptionIt += goods.getItDescr1()  == null ? "" : goods.getItDescr1()+"\n";
                    productDescriptionIt += goods.getItDescr2()  == null ? "" : goods.getItDescr2()+"\n";
                    productDescriptionIt += goods.getItDescr3()  == null ? "" : goods.getItDescr3()+"\n";
                    productDescriptionIt += goods.getItDescr4()  == null ? "" : goods.getItDescr4()+"\n";
                    productDescriptionIt += goods.getItDescr5()  == null ? "" : goods.getItDescr5()+"\n";
                    productDescriptionIt += goods.getItDescr6()  == null ? "" : goods.getItDescr6()+"\n";
                    productDescriptionIt += goods.getItDescr7()  == null ? "" : goods.getItDescr7()+"\n";
                    productDescriptionIt += goods.getItDescr8()  == null ? "" : goods.getItDescr8()+"\n";
                    productDescriptionIt += goods.getItDescr9()  == null ? "" : goods.getItDescr9()+"\n";
                    productDescriptionIt += goods.getItDescr10() == null ? "" : goods.getItDescr10()+"\n";
                    productDescriptionIt += goods.getItDescr11() == null ? "" : goods.getItDescr11()+"\n";
                    productDescriptionIt += goods.getItDescr12() == null ? "" : goods.getItDescr12()+"\n";
                    productDescriptionIt += goods.getItDescr13() == null ? "" : goods.getItDescr13()+"\n";
                    productDescriptionIt += goods.getItDescr14() == null ? "" : goods.getItDescr14()+"\n";
                    productDescriptionIt += goods.getItDescr15() == null ? "" : goods.getItDescr15()+"\n";
                    productDescriptionIt += goods.getItDescr16() == null ? "" : goods.getItDescr16()+"\n";
                    productDescriptionIt += goods.getItDescr17() == null ? "" : goods.getItDescr17()+"\n";
                    productDescriptionIt += goods.getItDescr18() == null ? "" : goods.getItDescr18()+"\n";
                    productDescriptionIt += goods.getItDescr19() == null ? "" : goods.getItDescr19()+"\n";
                    productDescriptionIt += goods.getItDescr20() == null ? "" : goods.getItDescr20()+"\n";
                    productDescriptionIt += goods.getItDescr24() == null ? "" : goods.getItDescr24()+"\n";
                    productDescriptionIt += goods.getItDescr22() == null ? "" : goods.getItDescr22()+"\n";
                    productDescriptionIt += goods.getItDescr23() == null ? "" : goods.getItDescr23()+"\n";
                    productDescriptionIt += goods.getItDescr24() == null ? "" : goods.getItDescr24()+"\n";
                    productDescriptionIt += goods.getItDescr25() == null ? "" : goods.getItDescr25()+"\n";
                    productDescriptionIt += goods.getItDescr26() == null ? "" : goods.getItDescr26()+"\n";
                    productDescriptionIt += goods.getItDescr27() == null ? "" : goods.getItDescr27()+"\n";
                    productDescriptionIt += goods.getItDescr28() == null ? "" : goods.getItDescr28()+"\n";
                    productDescriptionIt += goods.getItDescr29() == null ? "" : goods.getItDescr29()+"\n";
                    productDescriptionIt += goods.getItDescr30() == null ? "" : goods.getItDescr30()+"\n";
                    descIT.setProductDescription(productDescriptionIt.trim());
                    descIT.setCreateBy(createBy);
                    descIT.setCreateTime(createTime);
                    descList.add(descIT);

                    //西班牙
                    ProductTempDesc descES = new ProductTempDesc();
                    descES.setProductCode(database+"-"+goods.getSku());
                    descES.setCountryCode(EnumAmzDictCode.COUNTRYCODE_ES.getCode());//英国
                    descES.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_ES.getDesc());
                    descES.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descES.setItemName(goods.getEsTitle());
                    descES.setGenericKeywords(goods.getEsKey());
                    descES.setBulletPoint1(goods.getEsKeyPoints1());
                    descES.setBulletPoint2(goods.getEsKeyPoints2());
                    descES.setBulletPoint3(goods.getEsKeyPoints3());
                    descES.setBulletPoint4(goods.getEsKeyPoints4());
                    descES.setBulletPoint5(goods.getEsKeyPoints5());
                    String productDescriptionEs = "";
                    productDescriptionEs += goods.getEsDescr1()  == null ? "" : goods.getEsDescr1()+"\n";
                    productDescriptionEs += goods.getEsDescr2()  == null ? "" : goods.getEsDescr2()+"\n";
                    productDescriptionEs += goods.getEsDescr3()  == null ? "" : goods.getEsDescr3()+"\n";
                    productDescriptionEs += goods.getEsDescr4()  == null ? "" : goods.getEsDescr4()+"\n";
                    productDescriptionEs += goods.getEsDescr5()  == null ? "" : goods.getEsDescr5()+"\n";
                    productDescriptionEs += goods.getEsDescr6()  == null ? "" : goods.getEsDescr6()+"\n";
                    productDescriptionEs += goods.getEsDescr7()  == null ? "" : goods.getEsDescr7()+"\n";
                    productDescriptionEs += goods.getEsDescr8()  == null ? "" : goods.getEsDescr8()+"\n";
                    productDescriptionEs += goods.getEsDescr9()  == null ? "" : goods.getEsDescr9()+"\n";
                    productDescriptionEs += goods.getEsDescr10() == null ? "" : goods.getEsDescr10()+"\n";
                    productDescriptionEs += goods.getEsDescr11() == null ? "" : goods.getEsDescr11()+"\n";
                    productDescriptionEs += goods.getEsDescr12() == null ? "" : goods.getEsDescr12()+"\n";
                    productDescriptionEs += goods.getEsDescr13() == null ? "" : goods.getEsDescr13()+"\n";
                    productDescriptionEs += goods.getEsDescr14() == null ? "" : goods.getEsDescr14()+"\n";
                    productDescriptionEs += goods.getEsDescr15() == null ? "" : goods.getEsDescr15()+"\n";
                    productDescriptionEs += goods.getEsDescr16() == null ? "" : goods.getEsDescr16()+"\n";
                    productDescriptionEs += goods.getEsDescr17() == null ? "" : goods.getEsDescr17()+"\n";
                    productDescriptionEs += goods.getEsDescr18() == null ? "" : goods.getEsDescr18()+"\n";
                    productDescriptionEs += goods.getEsDescr19() == null ? "" : goods.getEsDescr19()+"\n";
                    productDescriptionEs += goods.getEsDescr20() == null ? "" : goods.getEsDescr20()+"\n";
                    productDescriptionEs += goods.getEsDescr24() == null ? "" : goods.getEsDescr24()+"\n";
                    productDescriptionEs += goods.getEsDescr22() == null ? "" : goods.getEsDescr22()+"\n";
                    productDescriptionEs += goods.getEsDescr23() == null ? "" : goods.getEsDescr23()+"\n";
                    productDescriptionEs += goods.getEsDescr24() == null ? "" : goods.getEsDescr24()+"\n";
                    productDescriptionEs += goods.getEsDescr25() == null ? "" : goods.getEsDescr25()+"\n";
                    productDescriptionEs += goods.getEsDescr26() == null ? "" : goods.getEsDescr26()+"\n";
                    productDescriptionEs += goods.getEsDescr27() == null ? "" : goods.getEsDescr27()+"\n";
                    productDescriptionEs += goods.getEsDescr28() == null ? "" : goods.getEsDescr28()+"\n";
                    productDescriptionEs += goods.getEsDescr29() == null ? "" : goods.getEsDescr29()+"\n";
                    productDescriptionEs += goods.getEsDescr30() == null ? "" : goods.getEsDescr30()+"\n";
                    descES.setProductDescription(productDescriptionEs.trim());
                    descES.setCreateBy(createBy);
                    descES.setCreateTime(createTime);
                    descList.add(descES);

                    //墨西哥-西班牙语
                    ProductTempDesc descMX = new ProductTempDesc();
                    descMX.setProductCode(database+"-"+goods.getSku());
                    descMX.setCountryCode(EnumAmzDictCode.COUNTRYCODE_MX.getCode());//英国
                    descMX.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_MX.getDesc());
                    descMX.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descMX.setItemName(goods.getEsTitle());
                    descMX.setGenericKeywords(goods.getEsKey());
                    descMX.setBulletPoint1(goods.getEsKeyPoints1());
                    descMX.setBulletPoint2(goods.getEsKeyPoints2());
                    descMX.setBulletPoint3(goods.getEsKeyPoints3());
                    descMX.setBulletPoint4(goods.getEsKeyPoints4());
                    descMX.setBulletPoint5(goods.getEsKeyPoints5());
                    descMX.setProductDescription(productDescriptionEs.trim());
                    descMX.setCreateBy(createBy);
                    descMX.setCreateTime(createTime);
                    descList.add(descMX);

                    //日本
                    ProductTempDesc descJP = new ProductTempDesc();
                    descJP.setProductCode(database+"-"+goods.getSku());
                    descJP.setCountryCode(EnumAmzDictCode.COUNTRYCODE_JP.getCode());//英国
                    descJP.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_JP.getDesc());
                    descJP.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descJP.setItemName(goods.getJpTitle());
                    descJP.setGenericKeywords(goods.getJpKey());
                    descJP.setBulletPoint1(goods.getJpKeyPoints1());
                    descJP.setBulletPoint2(goods.getJpKeyPoints2());
                    descJP.setBulletPoint3(goods.getJpKeyPoints3());
                    descJP.setBulletPoint4(goods.getJpKeyPoints4());
                    descJP.setBulletPoint5(goods.getJpKeyPoints5());
                    String productDescriptionJp = "";
                    productDescriptionJp += goods.getJpDescr1()  == null ? "" : goods.getJpDescr1()+"\n";
                    productDescriptionJp += goods.getJpDescr2()  == null ? "" : goods.getJpDescr2()+"\n";
                    productDescriptionJp += goods.getJpDescr3()  == null ? "" : goods.getJpDescr3()+"\n";
                    productDescriptionJp += goods.getJpDescr4()  == null ? "" : goods.getJpDescr4()+"\n";
                    productDescriptionJp += goods.getJpDescr5()  == null ? "" : goods.getJpDescr5()+"\n";
                    productDescriptionJp += goods.getJpDescr6()  == null ? "" : goods.getJpDescr6()+"\n";
                    productDescriptionJp += goods.getJpDescr7()  == null ? "" : goods.getJpDescr7()+"\n";
                    productDescriptionJp += goods.getJpDescr8()  == null ? "" : goods.getJpDescr8()+"\n";
                    productDescriptionJp += goods.getJpDescr9()  == null ? "" : goods.getJpDescr9()+"\n";
                    productDescriptionJp += goods.getJpDescr10() == null ? "" : goods.getJpDescr10()+"\n";
                    productDescriptionJp += goods.getJpDescr11() == null ? "" : goods.getJpDescr11()+"\n";
                    productDescriptionJp += goods.getJpDescr12() == null ? "" : goods.getJpDescr12()+"\n";
                    productDescriptionJp += goods.getJpDescr13() == null ? "" : goods.getJpDescr13()+"\n";
                    productDescriptionJp += goods.getJpDescr14() == null ? "" : goods.getJpDescr14()+"\n";
                    productDescriptionJp += goods.getJpDescr15() == null ? "" : goods.getJpDescr15()+"\n";
                    productDescriptionJp += goods.getJpDescr16() == null ? "" : goods.getJpDescr16()+"\n";
                    productDescriptionJp += goods.getJpDescr17() == null ? "" : goods.getJpDescr17()+"\n";
                    productDescriptionJp += goods.getJpDescr18() == null ? "" : goods.getJpDescr18()+"\n";
                    productDescriptionJp += goods.getJpDescr19() == null ? "" : goods.getJpDescr19()+"\n";
                    productDescriptionJp += goods.getJpDescr20() == null ? "" : goods.getJpDescr20()+"\n";
                    productDescriptionJp += goods.getJpDescr24() == null ? "" : goods.getJpDescr24()+"\n";
                    productDescriptionJp += goods.getJpDescr22() == null ? "" : goods.getJpDescr22()+"\n";
                    productDescriptionJp += goods.getJpDescr23() == null ? "" : goods.getJpDescr23()+"\n";
                    productDescriptionJp += goods.getJpDescr24() == null ? "" : goods.getJpDescr24()+"\n";
                    productDescriptionJp += goods.getJpDescr25() == null ? "" : goods.getJpDescr25()+"\n";
                    productDescriptionJp += goods.getJpDescr26() == null ? "" : goods.getJpDescr26()+"\n";
                    productDescriptionJp += goods.getJpDescr27() == null ? "" : goods.getJpDescr27()+"\n";
                    productDescriptionJp += goods.getJpDescr28() == null ? "" : goods.getJpDescr28()+"\n";
                    productDescriptionJp += goods.getJpDescr29() == null ? "" : goods.getJpDescr29()+"\n";
                    productDescriptionJp += goods.getJpDescr30() == null ? "" : goods.getJpDescr30()+"\n";
                    descJP.setProductDescription(productDescriptionJp.trim());
                    descJP.setCreateBy(createBy);
                    descJP.setCreateTime(createTime);
                    descList.add(descJP);

                    // 荷兰
                    ProductTempDesc descNL = new ProductTempDesc();
                    descNL.setProductCode(database+"-"+goods.getSku());
                    descNL.setCountryCode(EnumAmzDictCode.COUNTRYCODE_NL.getCode());//英国
                    descNL.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_NL.getDesc());
                    descNL.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descNL.setItemName(goods.getNlTitle());
                    descNL.setGenericKeywords(goods.getNlKey());
                    descNL.setBulletPoint1(goods.getNlKeyPoints1());
                    descNL.setBulletPoint2(goods.getNlKeyPoints2());
                    descNL.setBulletPoint3(goods.getNlKeyPoints3());
                    descNL.setBulletPoint4(goods.getNlKeyPoints4());
                    descNL.setBulletPoint5(goods.getNlKeyPoints5());
                    String productDescriptionNl = "";
                    productDescriptionNl += goods.getNlDescr1()  == null ? "" : goods.getNlDescr1()+"\n";
                    productDescriptionNl += goods.getNlDescr2()  == null ? "" : goods.getNlDescr2()+"\n";
                    productDescriptionNl += goods.getNlDescr3()  == null ? "" : goods.getNlDescr3()+"\n";
                    productDescriptionNl += goods.getNlDescr4()  == null ? "" : goods.getNlDescr4()+"\n";
                    productDescriptionNl += goods.getNlDescr5()  == null ? "" : goods.getNlDescr5()+"\n";
                    productDescriptionNl += goods.getNlDescr6()  == null ? "" : goods.getNlDescr6()+"\n";
                    productDescriptionNl += goods.getNlDescr7()  == null ? "" : goods.getNlDescr7()+"\n";
                    productDescriptionNl += goods.getNlDescr8()  == null ? "" : goods.getNlDescr8()+"\n";
                    productDescriptionNl += goods.getNlDescr9()  == null ? "" : goods.getNlDescr9()+"\n";
                    productDescriptionNl += goods.getNlDescr10() == null ? "" : goods.getNlDescr10()+"\n";
                    productDescriptionNl += goods.getNlDescr11() == null ? "" : goods.getNlDescr11()+"\n";
                    productDescriptionNl += goods.getNlDescr12() == null ? "" : goods.getNlDescr12()+"\n";
                    productDescriptionNl += goods.getNlDescr13() == null ? "" : goods.getNlDescr13()+"\n";
                    productDescriptionNl += goods.getNlDescr14() == null ? "" : goods.getNlDescr14()+"\n";
                    productDescriptionNl += goods.getNlDescr15() == null ? "" : goods.getNlDescr15()+"\n";
                    productDescriptionNl += goods.getNlDescr16() == null ? "" : goods.getNlDescr16()+"\n";
                    productDescriptionNl += goods.getNlDescr17() == null ? "" : goods.getNlDescr17()+"\n";
                    productDescriptionNl += goods.getNlDescr18() == null ? "" : goods.getNlDescr18()+"\n";
                    productDescriptionNl += goods.getNlDescr19() == null ? "" : goods.getNlDescr19()+"\n";
                    productDescriptionNl += goods.getNlDescr20() == null ? "" : goods.getNlDescr20()+"\n";
                    productDescriptionNl += goods.getNlDescr24() == null ? "" : goods.getNlDescr24()+"\n";
                    productDescriptionNl += goods.getNlDescr22() == null ? "" : goods.getNlDescr22()+"\n";
                    productDescriptionNl += goods.getNlDescr23() == null ? "" : goods.getNlDescr23()+"\n";
                    productDescriptionNl += goods.getNlDescr24() == null ? "" : goods.getNlDescr24()+"\n";
                    productDescriptionNl += goods.getNlDescr25() == null ? "" : goods.getNlDescr25()+"\n";
                    productDescriptionNl += goods.getNlDescr26() == null ? "" : goods.getNlDescr26()+"\n";
                    productDescriptionNl += goods.getNlDescr27() == null ? "" : goods.getNlDescr27()+"\n";
                    productDescriptionNl += goods.getNlDescr28() == null ? "" : goods.getNlDescr28()+"\n";
                    productDescriptionNl += goods.getNlDescr29() == null ? "" : goods.getNlDescr29()+"\n";
                    productDescriptionNl += goods.getNlDescr30() == null ? "" : goods.getNlDescr30()+"\n";
                    descNL.setProductDescription(productDescriptionNl.trim());
                    descNL.setCreateBy(createBy);
                    descNL.setCreateTime(createTime);
                    descList.add(descNL);

                    //瑞典
                    ProductTempDesc descSE = new ProductTempDesc();
                    descSE.setProductCode(database+"-"+goods.getSku());
                    descSE.setCountryCode(EnumAmzDictCode.COUNTRYCODE_SE.getCode());//英国
                    descSE.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_SE.getDesc());
                    descSE.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descSE.setItemName(goods.getSeTitle());
                    descSE.setGenericKeywords(goods.getSeKey());
                    descSE.setBulletPoint1(goods.getSeKeyPoints1());
                    descSE.setBulletPoint2(goods.getSeKeyPoints2());
                    descSE.setBulletPoint3(goods.getSeKeyPoints3());
                    descSE.setBulletPoint4(goods.getSeKeyPoints4());
                    descSE.setBulletPoint5(goods.getSeKeyPoints5());
                    String productDescriptionSe = "";
                    productDescriptionSe += goods.getSeDescr1()  == null ? "" : goods.getSeDescr1()+"\n";
                    productDescriptionSe += goods.getSeDescr2()  == null ? "" : goods.getSeDescr2()+"\n";
                    productDescriptionSe += goods.getSeDescr3()  == null ? "" : goods.getSeDescr3()+"\n";
                    productDescriptionSe += goods.getSeDescr4()  == null ? "" : goods.getSeDescr4()+"\n";
                    productDescriptionSe += goods.getSeDescr5()  == null ? "" : goods.getSeDescr5()+"\n";
                    productDescriptionSe += goods.getSeDescr6()  == null ? "" : goods.getSeDescr6()+"\n";
                    productDescriptionSe += goods.getSeDescr7()  == null ? "" : goods.getSeDescr7()+"\n";
                    productDescriptionSe += goods.getSeDescr8()  == null ? "" : goods.getSeDescr8()+"\n";
                    productDescriptionSe += goods.getSeDescr9()  == null ? "" : goods.getSeDescr9()+"\n";
                    productDescriptionSe += goods.getSeDescr10() == null ? "" : goods.getSeDescr10()+"\n";
                    productDescriptionSe += goods.getSeDescr11() == null ? "" : goods.getSeDescr11()+"\n";
                    productDescriptionSe += goods.getSeDescr12() == null ? "" : goods.getSeDescr12()+"\n";
                    productDescriptionSe += goods.getSeDescr13() == null ? "" : goods.getSeDescr13()+"\n";
                    productDescriptionSe += goods.getSeDescr14() == null ? "" : goods.getSeDescr14()+"\n";
                    productDescriptionSe += goods.getSeDescr15() == null ? "" : goods.getSeDescr15()+"\n";
                    productDescriptionSe += goods.getSeDescr16() == null ? "" : goods.getSeDescr16()+"\n";
                    productDescriptionSe += goods.getSeDescr17() == null ? "" : goods.getSeDescr17()+"\n";
                    productDescriptionSe += goods.getSeDescr18() == null ? "" : goods.getSeDescr18()+"\n";
                    productDescriptionSe += goods.getSeDescr19() == null ? "" : goods.getSeDescr19()+"\n";
                    productDescriptionSe += goods.getSeDescr20() == null ? "" : goods.getSeDescr20()+"\n";
                    productDescriptionSe += goods.getSeDescr24() == null ? "" : goods.getSeDescr24()+"\n";
                    productDescriptionSe += goods.getSeDescr22() == null ? "" : goods.getSeDescr22()+"\n";
                    productDescriptionSe += goods.getSeDescr23() == null ? "" : goods.getSeDescr23()+"\n";
                    productDescriptionSe += goods.getSeDescr24() == null ? "" : goods.getSeDescr24()+"\n";
                    productDescriptionSe += goods.getSeDescr25() == null ? "" : goods.getSeDescr25()+"\n";
                    productDescriptionSe += goods.getSeDescr26() == null ? "" : goods.getSeDescr26()+"\n";
                    productDescriptionSe += goods.getSeDescr27() == null ? "" : goods.getSeDescr27()+"\n";
                    productDescriptionSe += goods.getSeDescr28() == null ? "" : goods.getSeDescr28()+"\n";
                    productDescriptionSe += goods.getSeDescr29() == null ? "" : goods.getSeDescr29()+"\n";
                    productDescriptionSe += goods.getSeDescr30() == null ? "" : goods.getSeDescr30()+"\n";
                    descSE.setProductDescription(productDescriptionSe.trim());
                    descSE.setCreateBy(createBy);
                    descSE.setCreateTime(createTime);
                    descList.add(descSE);

                    //波兰
                    ProductTempDesc descPL = new ProductTempDesc();
                    descPL.setProductCode(database+"-"+goods.getSku());
                    descPL.setCountryCode(EnumAmzDictCode.COUNTRYCODE_PL.getCode());//英国
                    descPL.setLanguageCode(EnumAmzDictCode.COUNTRYCODE_PL.getDesc());
                    descPL.setMarketspacePriceCoefficient(new BigDecimal(1));
                    descPL.setItemName(goods.getPlTitle());
                    descPL.setGenericKeywords(goods.getPlKey());
                    descPL.setBulletPoint1(goods.getPlKeyPoints1());
                    descPL.setBulletPoint2(goods.getPlKeyPoints2());
                    descPL.setBulletPoint3(goods.getPlKeyPoints3());
                    descPL.setBulletPoint4(goods.getPlKeyPoints4());
                    descPL.setBulletPoint5(goods.getPlKeyPoints5());
                    String productDescriptionPl = "";
                    productDescriptionPl += goods.getPlDescr1()  == null ? "" : goods.getPlDescr1()+"\n";
                    productDescriptionPl += goods.getPlDescr2()  == null ? "" : goods.getPlDescr2()+"\n";
                    productDescriptionPl += goods.getPlDescr3()  == null ? "" : goods.getPlDescr3()+"\n";
                    productDescriptionPl += goods.getPlDescr4()  == null ? "" : goods.getPlDescr4()+"\n";
                    productDescriptionPl += goods.getPlDescr5()  == null ? "" : goods.getPlDescr5()+"\n";
                    productDescriptionPl += goods.getPlDescr6()  == null ? "" : goods.getPlDescr6()+"\n";
                    productDescriptionPl += goods.getPlDescr7()  == null ? "" : goods.getPlDescr7()+"\n";
                    productDescriptionPl += goods.getPlDescr8()  == null ? "" : goods.getPlDescr8()+"\n";
                    productDescriptionPl += goods.getPlDescr9()  == null ? "" : goods.getPlDescr9()+"\n";
                    productDescriptionPl += goods.getPlDescr10() == null ? "" : goods.getPlDescr10()+"\n";
                    productDescriptionPl += goods.getPlDescr11() == null ? "" : goods.getPlDescr11()+"\n";
                    productDescriptionPl += goods.getPlDescr12() == null ? "" : goods.getPlDescr12()+"\n";
                    productDescriptionPl += goods.getPlDescr13() == null ? "" : goods.getPlDescr13()+"\n";
                    productDescriptionPl += goods.getPlDescr14() == null ? "" : goods.getPlDescr14()+"\n";
                    productDescriptionPl += goods.getPlDescr15() == null ? "" : goods.getPlDescr15()+"\n";
                    productDescriptionPl += goods.getPlDescr16() == null ? "" : goods.getPlDescr16()+"\n";
                    productDescriptionPl += goods.getPlDescr17() == null ? "" : goods.getPlDescr17()+"\n";
                    productDescriptionPl += goods.getPlDescr18() == null ? "" : goods.getPlDescr18()+"\n";
                    productDescriptionPl += goods.getPlDescr19() == null ? "" : goods.getPlDescr19()+"\n";
                    productDescriptionPl += goods.getPlDescr20() == null ? "" : goods.getPlDescr20()+"\n";
                    productDescriptionPl += goods.getPlDescr24() == null ? "" : goods.getPlDescr24()+"\n";
                    productDescriptionPl += goods.getPlDescr22() == null ? "" : goods.getPlDescr22()+"\n";
                    productDescriptionPl += goods.getPlDescr23() == null ? "" : goods.getPlDescr23()+"\n";
                    productDescriptionPl += goods.getPlDescr24() == null ? "" : goods.getPlDescr24()+"\n";
                    productDescriptionPl += goods.getPlDescr25() == null ? "" : goods.getPlDescr25()+"\n";
                    productDescriptionPl += goods.getPlDescr26() == null ? "" : goods.getPlDescr26()+"\n";
                    productDescriptionPl += goods.getPlDescr27() == null ? "" : goods.getPlDescr27()+"\n";
                    productDescriptionPl += goods.getPlDescr28() == null ? "" : goods.getPlDescr28()+"\n";
                    productDescriptionPl += goods.getPlDescr29() == null ? "" : goods.getPlDescr29()+"\n";
                    productDescriptionPl += goods.getPlDescr30() == null ? "" : goods.getPlDescr30()+"\n";
                    descPL.setProductDescription(productDescriptionPl.trim());
                    descPL.setCreateBy(createBy);
                    descPL.setCreateTime(createTime);
                    descList.add(descPL);


                }
                else if (goods.getParentChild().equals("child")){

                    ProductTempRlat rlat = new ProductTempRlat();
                    rlat.setProductCode(database+"-"+goods.getSku());


                    String color = goods.getColor()==null ? "" : goods.getColor();
                    String size = goods.getSize()==null ? "" : goods.getSize();

                    if (!color.equals("") && !size.equals("")){
                        rlat.setItemSku(database+"-"+goods.getSku()+"-"+color+"-"+size);
                    }else if (!color.equals("") && size.equals("")){
                        rlat.setItemSku(database+"-"+goods.getSku()+"-"+color);
                    }else if (color.equals("") && !size.equals("")){
                        rlat.setItemSku(database+"-"+goods.getSku()+"-"+size);
                    }

                    rlat.setParentSku(database+"-"+goods.getSku());//父体sku为null
                    rlat.setExternalProductId("");//EAN值/父体为null
                    rlat.setExternalProductIdType("");//EAN/父体为null
                    rlat.setParentChild(AmzConstants.PARENTAGE_CHILD);
                    rlat.setRelationshipType("Variation");//关系类型/父体为null
                    rlat.setVariationTheme(goods.getVariantTheme());
                    rlat.setColorName(goods.getColor());
                    rlat.setSizeName(goods.getSize());
                    rlat.setItemWeight(Double.parseDouble(goods.getWeight()));
                    rlat.setStandardPrice(new BigDecimal(goods.getPrice()));
                    rlat.setQuantity(Integer.parseInt(goods.getStock()));
                    rlat.setMainImageUrl(goods.getMainPic());
                    rlat.setOtherImageUrl1(goods.getPic1());
                    rlat.setOtherImageUrl2(goods.getPic2());
                    rlat.setOtherImageUrl3(goods.getPic3());
                    rlat.setOtherImageUrl4(goods.getPic4());
                    rlat.setOtherImageUrl5(goods.getPic5());
                    rlat.setOtherImageUrl6(goods.getPic6());
                    rlat.setOtherImageUrl7(goods.getPic7());
                    rlat.setOtherImageUrl8(goods.getPic8());
                    rlat.setCreateBy(createBy);
                    rlat.setCreateTime(createTime);
                    rlatList.add(rlat);
                }
                else{
                    System.out.println("goods.getParentChild()===异常=="+goods.getParentChild());
                }

                System.out.println("封装完成，准备保存new_sku=="+database+"-"+goods.getSku());
            }

            productTempBasicDao.saveAll(basicList);
            productTempRlatDao.saveAll(rlatList);
            productTempDescDao.saveAll(descList);

            System.out.println("成功导入"+basicList.size()+"个产品");

        }


        return AjaxResult.success();

    }

}
